<%@ page import="database.MySQLUtils" %>
<%@ page import="java.sql.ResultSet" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>京东超市-种类齐全</title>
    <link rel="icon" type="image/x-icon" href="res/favicon.ico"/>
    <link rel="stylesheet" href="./main.css?v=<%=System.currentTimeMillis()%>">
    <script>
        function getuser() {
            <%String username_mobile = (String) request.getParameter("username");%>
            <%!String username="";%>
            <%if(username_mobile!=null){
            String sql="select username from user where mobile='"+username_mobile+"'";
            ResultSet resultSet = MySQLUtils.getResultSet(sql);
            if(resultSet.next()){
                username = resultSet.getString(1);
            }
            %>
            var user = '<%=username%>';
            isLogin = (user!="");
            document.getElementById("welcome").innerHTML = user + ",欢迎登录";
            <%}%>
        }
        function tologin() {
            if(!isLogin){
                location.href="login.jsp";
            }
        }
    </script>
    <script src="main.js"></script>
</head>
<body>
<%
    request.setCharacterEncoding("UTF-8");
    response.setContentType("text/html;charset=UTF-8");
%>
<div class="header">
    <ul>
        <li style="border: none; color:#f10213;" id="welcome" onclick="tologin()">欢迎登录</li>
        <li>我的订单</li>
        <li>我的京东</li>
        <li>京东会员</li>
        <li>企业采购</li>
        <li>客户服务</li>
        <li>网站导航</li>
        <li>手机京东</li>
    </ul>
</div>
<div class="bar">
    <img src="./res/logo.png" alt="">
    <div class="search">
        <input type="text">
        <button>搜索</button>
        <ul>
            <li>满199减100</li>
            <li>健康守护</li>
            <li>中外美酒</li>
            <li>个人护理</li>
            <li>纸品家清</li>
        </ul>
    </div>
    <button style="top: 30px;
                        left: 1330px;
                        background-image: url(./res/gouwuche.png);
                        background-repeat: no-repeat;
                        background-position: 100px 12px;
                        text-align: left;
                        padding-left: 32px;">
        我的购物车
        <div class="cir">0</div>
    </button>
    <button style="top: 30px;
                        left: 1500px;
                        background-image: url(./res/DRcode.png);
                        background-repeat: no-repeat;
                        background-position: 19px 7px;
                        padding-left: 30px;">
        扫码享受优惠
    </button>
</div>
<div class="box">
    <div class="sort">
        <div class="sleft">
            <dl>
                <dt style="height: 30px;
                                background-color: #ffa133;
                                color: white;
                                font-weight: 700;
                                font-size: 14px;
                                padding-left: 30px;
                                line-height: 30px;">
                    京东分类
                </dt>
                <dd>食品饮料
                    <pre style="display: inline;">         </pre>
                    >
                </dd>
                <dd>粮油副食
                    <pre style="display: inline;">         </pre>
                    >
                </dd>
                <dd>个人护理
                    <pre style="display: inline;">         </pre>
                    >
                </dd>
                <dd>护肤美妆
                    <pre style="display: inline;">         </pre>
                    >
                </dd>
                <dd>家居清洁
                    <pre style="display: inline;">         </pre>
                    >
                </dd>
                <dd>母婴用品
                    <pre style="display: inline;">         </pre>
                    >
                </dd>
                <dd>中外名酒
                    <pre style="display: inline;">         </pre>
                    >
                </dd>
                <dd>京东生鲜
                    <pre style="display: inline;">         </pre>
                    >
                </dd>
                <dd>居家生活
                    <pre style="display: inline;">         </pre>
                    >
                </dd>
            </dl>
        </div>
        <div class="smid">
            <ul>
                <li>超市首页</li>
                <li>超值量贩</li>
                <li>京东生鲜</li>
                <li>品牌特卖</li>
                <li>山姆会员店</li>
                <li>企业采购</li>
            </ul>
            <div class="o" style="left: 20px;" onclick="nextPng(-1)" onmouseover="stop()" onmouseout="start()">
                <div class="bow" style="left: 6px;transform: rotate(225deg);"></div>
            </div>
            <div class="o" onclick="nextPng(1)" onmouseover="stop()" onmouseout="start()">
                <div class="bow"></div>
            </div>
            <img id="lunbotu" src="./res/l1.webp" alt=""
                 style="cursor:pointer;margin-top:4px;margin-left:15px;margin-bottom: 4px"
                 onmouseover="stop()"
                 onmouseout="start()">
            <div style="float: left;width: 405px;height: 150px;text-align: center;">
                <img src="./res/legao.webp" alt="">
            </div>
            <div style="float: left;width: 405px;height: 150px;text-align: center;">
                <img src="./res/pijiu.webp" alt="">
            </div>
        </div>
        <div class="sright">
            <img src="./res/you.webp" alt="" height="580px;">
        </div>
    </div>
    <!-- <div class="goods">
        <div class="gheader">
            清洁用品
        </div>
        <div class="ggood">
            <div class="gleft">
                <ul>
                    <li>手洗洗衣液</li>
                </ul>
            </div>
            <div class="gright">
                <div class="gg">
                    <img src="./res/good0.webp" alt="" class="img">
                    <div class="info">
                        绿伞蓝泡泡马桶清洁剂50g*5粒洁厕宝
                    </div>
                    <div class="price">
                        ￥15.90
                    </div>
                    <div class="ent">
                        加入购物车
                    </div>
                </div>
            </div>
        </div>
    </div> -->
</div>
</body>
</html>
